<html>
<head><meta charset="utf-8"><title>Cargo.toml version from external file · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cargo.2Etoml.20version.20from.20external.20file.html">Cargo.toml version from external file</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="217050581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cargo.toml%20version%20from%20external%20file/near/217050581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Maximilian Hristache <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cargo.2Etoml.20version.20from.20external.20file.html#217050581">(Nov 17 2020 at 19:30)</a>:</h4>
<p>Is there a way to tell cargo to read the app version from an external file instead of Cargo.toml? Or some magic syntax in Cargo.toml to tell it to use the external file to read the version?</p>



<a name="217052754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cargo.toml%20version%20from%20external%20file/near/217052754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cargo.2Etoml.20version.20from.20external.20file.html#217052754">(Nov 17 2020 at 19:48)</a>:</h4>
<p><span class="user-mention" data-user-id="363601">@Maximilian Hristache</span> No, there's no current way to do that. There's a way to get Cargo to tell you the version that's in <code>Cargo.toml</code>, such as to compile it into your program. But if you're looking to have Cargo read the version number from somewhere else, we don't have a way to do that. (Also, there's a #t-cargo channel that may help.)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>